package com.zhihu_lvliangi_android.option.parent;

import android.support.v7.app.ActionBarActivity;

import com.android.volley.Response;
import com.zhihu_lvliangi_android.service.MobileApplication;

/**
 * Activity基础类
 *
 * @author azuryleaves
 * @since 2014-8-21 上午9:49:13
 * @version 1.0
 *
 */
public class BasicActivity extends ActionBarActivity implements Response.Listener<Object> {

	@Override
	protected void onStop() {
		super.onStop();
		try {
			MobileApplication.getInstance().clientTask.cancelPendingRequests(this.getClass().getName());
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	@Override
	public void onResponse(Object response, Enum<?> reqId) {
		System.out.println("---response---" + response.toString());
		MobileApplication.getInstance().clientTask.cancelLoadingView();
	}

}
